package edu.zut.cs.software.person.admin.domain;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import edu.zut.cs.software.teach.Base.domain.BaseTreeEntity;
/**
 * 
 * @author wangyunfei
 *
 */

@Entity
@Table(name = "T_ADMINCATEGORY")
@NamedQueries({ @NamedQuery(name = "AdminCategory.getRoot", query = "select m from AdminCategory m where m.parent is null") })
public class AdminCategory extends BaseTreeEntity<AdminCategory,Long> {
	private static final long serialVersionUID = -4376674977047164142L;

	@Column(name = "EMAIL")
	String email;


	@Column(name = "PASSWORD")
	String password;

	@Column(name = "USERNAME")
	String username;

	public String getEmail() {
		return email;
	}

	
	@OneToMany(mappedBy = "admincategory", cascade = CascadeType.REMOVE, fetch = FetchType.EAGER)
	List<Admin> admin;
	public String getPassword() {
		return password;
	}

	public String getUsername() {
		return username;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	

	public void setPassword(String password) {
		this.password = password;
	}

	public void setUsername(String username) {
		this.username = username;
	}
	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	
}
